# https://treyhunner.com/2021/11/how-to-flatten-a-list-in-python/?__s=vypqqsmqzb9nm2mjg8to


from itertools import chain

groups = [("Hong", "Ryan"), ("Anthony", "Wilhelmina"), ("Margaret", "Adrian")]

names=[]
names1=[]
for group in groups:
    names.extend(group)
    names1 += group
print(names,names1)

print(chain (*groups))

print(list(chain(*groups)))

print(list(chain.from_iterable(groups)))

names2 = [
    name
    for group in groups
    for name in group
]
print(names2)